    /* add.c
     * a simple C program
     *//*/*//*comment*//// */
      
    #include <stdio.h>
    #define LAST 10

    int flotante = 123.456;
    int main()
    {
        int i, sum = 0, min, max;
        int value;
        int cmd;

        for ( i = 1; i <= LAST; i++ ) {
          sum += i;
        } /*-for-*/
        printf("sum = %d\n", sum);
        
	do {		// do while statement
		min=255;	// expression
		max=0;
		for(i=0; i<=30; ++i) {	// for statement
	   	delay_ms(100);	// delay built-in function call
	    value = Read_ADC();  // A/D read functions- built-in
	   	if(value<min)        // if statement
	      min=value;
	   	if(value>max)        // if statement
	      max=value;
		}
	printf("\n\rMin: %2X Max: %2X\n\r",min,max);
   } while (1);

	switch (cmd) {
		case 0: printf("cmd 0");
		break;
		case 1: printf("cmd 1");
		break;
		default: printf("bad cmd");
		break; }
        

        return 0;
    }



